home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / S3ENV10.ARJ / ENVED10.DOC < prev    next >
Text File  |  1992-07-08  |  7KB  |  158 lines

  1. Program:   Environment Editor
  2. Version:   1.0     
  3. Date:      07/08/92
  4. Author:    George Spafford
  5.  
  6. Purpose:
  7.  
  8. To edit the master environment table, save tables to files and to load
  9. tables from files.
  10.  
  11. Background:
  12.  
  13. The DOS environment table contains variables that contain information for
  14. DOS and for programs.  For example, PATH, PROMPT, COMPSEC and TEMP are all
  15. DOS variable names.  Compilers frequently store the path names for their 
  16. libraries and include files in an environment variable.  With all of the
  17. uses of the environment, it is easy to run out of space in it.
  18.  
  19. The size of the environment table, by default, is usually fairly small (128 
  20. or 256 bytes).  It can be increased by use of the SHELL statement in the
  21. CONFIG.SYS in DOS versions 3.1 and above.  Version 3.1 is a little different
  22. from other versions of DOS in that the number of 16-byte paragraphs are
  23. specified rather than the number of bytes of environment space.  For DOS 3.1,
  24. the following command is used:
  25.  
  26.         SHELL=C:\DOS\COMMAND.COM /E:64 /P
  27.  
  28. This gives you 64 paragraphs that are 16 bytes each, or 1024 bytes total.  The
  29. /P switch makes it the permanent shell.  For versions newer than 3.1, the
  30. actual number of bytes are specified.  For example:
  31.  
  32.         SHELL=C:\DOS\COMMAND.COM /E:1024 /P
  33.  
  34. It sets aside 1024 bytes for the environment and again makes this shell the
  35. permanent one.  At any rate, you only have so much space & you may need
  36. to add, delete or change variables at any given time.
  37.  
  38. ENV.BAT:
  39.  
  40. Take a moment to look at the ENV.BAT file.  
  41.  
  42. @echo off
  43. set expand1=001122334455667788990011223344556677889900112233445566778899
  44. set expand2=001122334455667788990011223344556677889900112233445566778899
  45. enved
  46.  
  47. The first line just turns off the DOS command echo - in other words, you will
  48. not see anything that runs afterwards.  The important lines are the 2nd and 3rd.
  49. You see, when a program runs, such as ENVED.EXE, it gets a copy of the parent
  50. environment and gets only a small portion, if any, of free environment space.
  51. By loading up EXPAND1 and EXPAND2 with dummy bytes, that space can be retrieved
  52. by ENVED.  Those two variables do not have to exist, but if you plan on adding
  53. a lot of variables to the table, you need either one or both of these lines.
  54. You can also vary the length of the lines to set aside however much space that
  55. you want to.
  56.  
  57. ENVED.EXE
  58.  
  59. Remember, if you want to add variables, make sure that you run the editor
  60. via the ENV.BAT file (or whatever you want to name the .BAT file) so the
  61. dummy EXPAND1 and/or EXPAND2 entries can be used.
  62.  
  63. Making Changes:
  64.  
  65. ENVED reads in the environment table and displays it in a menu.  If you want
  66. to change a variable, highlight it and press enter.  An editor will appear with
  67. the variable as it appears now.
  68.  
  69. Using the Editor:
  70.  
  71.         1.  DO NOT TYPE "SET"!!!  Not before the variable name and definitely
  72.             NOT by itself.
  73.         2.  Always put an equal sign between your variable name and value.
  74.             For example:      DSZ=C:\PROTOCOLS
  75.         3.  The editor shows three lines on the screen, but it is really just
  76.             one long string wrapped around.  Do not try to use the up and down
  77.             arrows.  <HOME> can take you to the start of the line, <END> will
  78.             jump to the end, and the arrow keys can move you around.
  79.         4.  Press <ENTER> when finished.
  80.  
  81. Inserting New Variables:
  82.  
  83. If you want to add a new entry, press <INS> from the main menu.  Use the editor
  84. to type in your new value.  Adhere to the rules set above.
  85.  
  86. Deleting Variables:
  87.  
  88. Highlight the variable that you would like to delete and press <DEL>.
  89.  
  90. Saving Files:
  91.  
  92. If you want to save a table for future use, press F1 and then F2 to save the
  93. file.  Enter up to 8 letters to create a VALID DOS file name (no spaces).
  94. The program will assign an extension of .ENV so do not try to assign one
  95. yourself.
  96.  
  97. Loading Files:
  98.  
  99. If you want to use a previously saved configuration, press F1 and then F1
  100. again.  Select the file that you want to use from the menu.  Note, when
  101. you load a file, all existing environment entries will be deleted.  The
  102. file that you are loading becomes essentially the new environment table entry.
  103.  
  104. Exiting ENVED:
  105.  
  106. When you exit the program, if you want to save the changes, press <ENTER>.  If
  107. you do not want to save the changes, press <ESC>.
  108.  
  109. How does it do it?
  110.  
  111. To get around the problem of only modifying the child environment and not the
  112. parent environment, a batch file called ##ENV##.BAT is created.  A special
  113. routine stuffs that name into the keyboard buffer and a fake enter.  When
  114. ENVED has actually terminated, the batch file is executed and all of the
  115. updates are made.  ENVED does not delete this file so you can see it and
  116. keep it if you want to quickly access the changes.
  117.  
  118. Registration:
  119.  
  120. If you find this program to be useful, please register it within
  121. 30 days of its initial use.  If you continue to use it after this
  122. period of time, you are violating your license to use it.  Only
  123. by registering the program can you legally continue to use it.
  124. And only by registering your copy can I continue to develop shareware
  125. programs such as this.
  126.  
  127. The Environment Editor is priced at $10 per concurrently used copy.  Site
  128. licenses are available based on the number of machines that will use it on
  129. the site concurrently.
  130.  
  131. Please send payments in American funds to (please no cash):
  132.  
  133.                 George Spafford
  134.                 3001 Lakeshore Drive #329
  135.                 St. Joseph, MI 49085
  136.  
  137.                 Queued Access BBS 19200-8-N-1 ANSI (616) 468-5026
  138.                 Sysop:  Tim Akright NEC/NC
  139.  
  140. If you have any comments or suggestions, I'd really like to hear them
  141. too.  I try to respond to all of my mail.
  142.  
  143. SHAREWARE DISTRIBUTORS:
  144.  
  145. You may distribute this program as long as it is made clear that you are
  146. only a distributor and that the program is not registered until they make
  147. payment to me.  Please do not charge more than $5 per disk to distribute 
  148. ENVED to your customers (unless of course ENVED is on a CDROM with 100's of
  149. other programs).
  150.  
  151. ::::: Legal :::::
  152.      
  153. ENVED IS DISTRIBUTED AS IS.  THE AUTHOR (GEORGE SPAFFORD) MAKES
  154. NO WARRANTIES OF APPROPRIATENESS, MERCHANTABILITY OR FITNESS FOR A
  155. PARTICULAR PURPOSE.  THE AUTHOR ASSUMES NO LIABILITY FOR ANY DAMAGES
  156. (INCLUDING LOST PROFITS, WAGES OR ANY OTHER CONSEQUENTIAL OR INCIDENTAL
  157. DAMAGES) ARISING OUT OF THE MISUSE OR INABILITY TO USE THIS PRODUCT PACKAGE.
  158.